(define-module (python rotate-backups)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system python)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages time)
  #:use-module (guix packages)
  #:use-module (guix download))

(define-public python-pyreadline
  (package
    (name "python-pyreadline")
    (version "2.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pyreadline" version ".zip"))
       (sha256
        (base32
         "1lg255r2qfmaln7dgr3hlb0kg4m07m1n95ppm6qjanz8q8pmjc25"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f))
    (native-inputs `(("unzip" ,unzip)))
    (home-page "http://ipython.org/pyreadline.html")
    (synopsis
     "A python implmementation of GNU readline.")
    (description
     "A python implmementation of GNU readline.")
    (license license:bsd-3)))

(define-public python-humanfriendly-next
  (package
    (name "python-humanfriendly")
    (version "7.1.1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "humanfriendly" version))
       (sha256
        (base32
         "0r853k0j8dyqsx0l5sbzsi3f59dsh5rjmas87d0ymp2qzf12np2y"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f))
    (propagated-inputs
     `(("python-monotonic" ,python-monotonic)
       ("python-pyreadline" ,python-pyreadline)))
    (home-page
     "https://humanfriendly.readthedocs.io")
    (synopsis
     "Human friendly output for text interfaces using Python")
    (description
     "Human friendly output for text interfaces using Python")
    (license license:expat)))

(define-public python-coloredlogs-next
  (package
    (name "python-coloredlogs")
    (version "14.0")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "coloredlogs" version))
       (sha256
        (base32
         "01d564fl88lkqlr888filf9iy7q35lsc823nm70acfh5sa9v3ym1"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f))
    (propagated-inputs
     `(("python-humanfriendly" ,python-humanfriendly-next)
       ("python-verboselogs" ,python-verboselogs)))
    (home-page "https://coloredlogs.readthedocs.io")
    (synopsis
     "Colored terminal output for Python's logging module")
    (description
     "Colored terminal output for Python's logging module")
    (license license:expat)))

(define-public python-update-dotdee
  (package
    (name "python-update-dotdee")
    (version "5.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "update-dotdee" version))
        (sha256
          (base32
            "0cz486hzds8z1wqvn014p1phipvmm53hgl8pmvy2rd9zyslsy5kk"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f))
    (propagated-inputs
      `(("python-coloredlogs" ,python-coloredlogs-next)
        ("python-executor" ,python-executor)
        ("python-humanfriendly" ,python-humanfriendly-next)
        ("python-naturalsort" ,python-naturalsort)
        ("python-property-manager"
         ,python-property-manager)
        ("python-six" ,python-six)))
    (home-page
      "https://github.com/xolox/python-update-dotdee")
    (synopsis
      "Generic modular configuration file manager")
    (description
      "Generic modular configuration file manager")
    (license #f)))

(define-public python-simpleeval
  (package
    (name "python-simpleeval")
    (version "0.9.10")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "simpleeval" version))
        (sha256
          (base32
            "1skvl467kj83rzkhk01i0wm8m5vmh6j5znrfdizn6r18ii45a839"))))
    (build-system python-build-system)
    (home-page
      "https://github.com/danthedeckie/simpleeval")
    (synopsis
      "A simple, safe single expression evaluator library.")
    (description
      "A simple, safe single expression evaluator library.")
    (license #f)))

(define-public python-naturalsort
  (package
    (name "python-naturalsort")
    (version "1.5.1")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "naturalsort" version))
        (sha256
          (base32
            "0mkk27km6sibxjfmvp39szsphj775z2x3pm2ig020d5swzb5waqp"))))
    (build-system python-build-system)
    (home-page
      "https://github.com/xolox/python-naturalsort")
    (synopsis
      "Simple natural order sorting API for Python")
    (description
      "Simple natural order sorting API for Python")
    (license #f)))

(define-public python-property-manager
  (package
    (name "python-property-manager")
    (version "2.3.1")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "property-manager" version))
        (sha256
          (base32
            "0bqnhl2lmnhwjisn67c49r3crw6h51lkr91z29sax4anz4qg5q8r"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f))
    (propagated-inputs
      `(("python-humanfriendly" ,python-humanfriendly-next)
        ("python-verboselogs" ,python-verboselogs)))
    (home-page
      "https://property-manager.readthedocs.org")
    (synopsis
      "Useful property variants for Python programming (required properties, writable properties, cached properties, etc)")
    (description
      "Useful property variants for Python programming (required properties, writable properties, cached properties, etc)")
    (license license:expat)))

(define-public python-executor
  (package
    (name "python-executor")
    (version "21.3")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "executor" version))
        (sha256
          (base32
            "1k16lgbg4xhx45x7xw7h43biqlxfsddy4fvn08wjxmc6868lx3ga"))))
    (build-system python-build-system)
    (arguments
     '(#:tests? #f))
    (propagated-inputs
      `(("python-coloredlogs" ,python-coloredlogs-next)
        ("python-fasteners" ,python-fasteners)
        ("python-humanfriendly" ,python-humanfriendly-next)
        ("python-property-manager"
         ,python-property-manager)
        ("python-six" ,python-six)))
    (home-page "https://executor.readthedocs.io")
    (synopsis
      "Programmer friendly subprocess wrapper")
    (description
      "Programmer friendly subprocess wrapper")
    (license license:expat)))

(define-public python-rotate-backups
  (package
    (name "python-rotate-backups")
    (version "8.0")
    (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "rotate-backups" version))
        (sha256
          (base32
            "1vh7zl1q3w19w0vym9s9p4h9ais668xad4nb664r34xn1qnqnikl"))))
    (build-system python-build-system)
    (propagated-inputs
      `(("python-coloredlogs" ,python-coloredlogs-next)
        ("python-dateutil" ,python-dateutil)
        ("python-executor" ,python-executor)
        ("python-humanfriendly" ,python-humanfriendly-next)
        ("python-naturalsort" ,python-naturalsort)
        ("python-property-manager"
         ,python-property-manager)
        ("python-simpleeval" ,python-simpleeval)
        ("python-six" ,python-six)
        ("python-update-dotdee" ,python-update-dotdee)
        ("python-verboselogs" ,python-verboselogs)))
    (home-page
      "https://github.com/xolox/python-rotate-backups")
    (synopsis
      "Simple command line interface for backup rotation")
    (description
      "Simple command line interface for backup rotation")
    (license license:expat)))

python-rotate-backups
